package com.xiaoyu.izf.model;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "merchant_pay_channel", schema = "izf", catalog = "")
public class MerchantPayChannel {
    private int id;
    private Integer merchantId;
    private Integer type;
    private String typeTips;
    private Integer associatedId;
    private Timestamp insertTime;
    private Integer opened;
    private Integer isUsing;
    private Integer settleType;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "merchant_id")
    public Integer getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(Integer merchantId) {
        this.merchantId = merchantId;
    }

    @Basic
    @Column(name = "type")
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Basic
    @Column(name = "type_tips")
    public String getTypeTips() {
        return typeTips;
    }

    public void setTypeTips(String typeTips) {
        this.typeTips = typeTips;
    }

    @Basic
    @Column(name = "associated_id")
    public Integer getAssociatedId() {
        return associatedId;
    }

    public void setAssociatedId(Integer associatedId) {
        this.associatedId = associatedId;
    }

    @Basic
    @Column(name = "insert_time")
    public Timestamp getInsertTime() {
        return insertTime;
    }

    public void setInsertTime(Timestamp insertTime) {
        this.insertTime = insertTime;
    }

    @Basic
    @Column(name = "opened")
    public Integer getOpened() {
        return opened;
    }

    public void setOpened(Integer opened) {
        this.opened = opened;
    }

    @Basic
    @Column(name = "is_using")
    public Integer getIsUsing() {
        return isUsing;
    }
    public void setIsUsing(Integer isUsing) {
        this.isUsing = isUsing;
    }

    @Basic
    @Column(name = "settle_type")
    public Integer getSettleType() {
        return settleType;
    }

    public void setSettleType(Integer settleType) {
        this.settleType = settleType;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MerchantPayChannel that = (MerchantPayChannel) o;
        return id == that.id &&
                Objects.equals(merchantId, that.merchantId) &&
                Objects.equals(type, that.type) &&
                Objects.equals(typeTips, that.typeTips) &&
                Objects.equals(associatedId, that.associatedId) &&
                Objects.equals(insertTime, that.insertTime) &&
                Objects.equals(opened, that.opened) &&
                Objects.equals(isUsing, that.isUsing);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, merchantId, type, typeTips, associatedId, insertTime, opened, isUsing);
    }
}
